
package com.dstz.form.constants;

/**
 * 常用是,非变量
 * 
 * @author xianggang
 *
 */
public interface BooleanConstants {
    
    
    /*** 0 */
    int NO = 0;
    
    /*** 1 */
    int YES = 1;
    
    /*** Y */
    String STR_YES = "Y";
    
    /*** Y */
    String STR_NO = "N";
    
    /*** 0 */
    int DISABLED = 0;
    
    /*** 1 */
    int ENABLED = 1;
    
    /*** 0 */
    short NO_SHORT = 0;
    
    /*** 1 */
    short YES_SHORT = 1;
    
    /*** true */
    boolean TRUE = true;
    
    /*** false */
    boolean FALSE = false;
    
    /*** "true" */
    String TRUESTR = "true";
    
    /*** "false" */
    String FALSESTR = "false";
    
    /*** 1 */
    String STR_TRUE = "1";
    
    /*** 0 */
    String STR_FALSE = "0";
    
    /*** 1 */
    String YES_STR = "1";
    
    /*** 0 */
    String YES_NO = "0";
    
    public static Integer isTrue ( String strYesOrNo ) {
        if ( BooleanConstants.STR_YES.equalsIgnoreCase( strYesOrNo ) ) {
            return YES;
        }
        return NO;
    }
    
}